import React from 'react'
import { Button, Space } from "antd-mobile";
import { useNavigate } from 'react-router-dom';
function Index() {
    const nav=useNavigate()
    const gohome = () => {
localStorage.setItem(
  "token",
  "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6OSwidXNlcm5hbWUiOiJ6cyIsInRlbCI6bnVsbCwidGVsQ29kZSI6IjJHUjgiLCJhdmF0YXIiOiJodHRwczovL2FwaS10aWNrZXQubGl1bG9uZ2Jpbi50b3AvaW1hZ2VzL2F2YXRhci5qcGciLCJpYXQiOjE3NDcxMDM1NjUsImV4cCI6MTc0OTY5NTU2NX0.4R97D0DxKPvLd1VlMmKYpgb5951iMgy0XI6A12qplsQ"
        );
        nav('/home')
    };
  return (
    <div>
      <Button block color="primary" size="large" onClick={gohome}>
        Block Button
      </Button>
    </div>
  );
}

export default Index
